package com.zhongli.devplatform.service.imp.sys;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhongli.devplatform.dto.sys.RoleDTO;
import com.zhongli.devplatform.po.user.ReadRolePO;
import com.zhongli.devplatform.query.sys.RoleQuery;
import com.zhongli.devplatform.vo.sys.RoleVO;

import java.util.List;

/**
* @author  WuXiCheng
* @date  2020/7/23 10:12
* @version 1.0
*/
public interface ReadRoleService extends IService<ReadRolePO>{

    void save(RoleDTO roleDTO);

    void delete(Integer id);

    Boolean isExist(RoleQuery query);

    void saveRoleMenu(Integer roleId, List<Integer> menuIds);

    void saveRoleResource(Integer roleId, List<Integer> resourceIds);

    Integer getRoleIdByCode(String code);

    List<RoleVO> listCurrUserRole(String deviceType);

    List<String> listDeviceType(Integer roleId);

    List<Integer> listRoleByDeviceType(String deviceType);
}
